<?php
/**
 * Created by PhpStorm.
 * User: tangbl
 * Date: 2019/02/27
 * Time: 10:05
 */
namespace app\wechat\common\validate;
use think\Validate;

/*
 * 用户验证类
 */
class User extends Validate{

    //验证规则
    protected $rule = [
        'mobile' => 'require|mobile',
        'contact' => 'require',
    ];

    //错误信息
    protected $message = [
        'mobile.require' => '请输入手机号码',
        'mobile.mobile' => '手机号码格式不正确',
        'contact.require' => '请输入联系人！',
    ];

    //验证场景
    protected $scene = [
        'partJoin' => ['mobile'],//活动参与
    ];
}